using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class GamePanel : MonoBehaviour
{
    [SerializeField] private Button inventoryButton;
    [SerializeField] private Button menuButton;


    private void Start()
    {
        inventoryButton.onClick.AddListener(() =>
        {
            UIManager.Instance.OpenPanel(UIConst.INVENTORY);
        });
        
        //
        menuButton.onClick.AddListener(() =>
        {
            // 暂停游戏
            TimeSystem.Instance.TakeGameTime(true);
            // 打开菜单面板
            UIManager.Instance.OpenPanel(UIConst.GAMEMENU);
        });
    }
}